<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <!-- 全局组件-->
    <div id="app">
       <aaa></aaa>
    </div>
    <script>
        //1
        var Aaa = Vue.extend({
            template:'<h1>这是一个全局组件!!!</h1>'
        })
        var Abb = Vue.extend({
            template:'<h1>这是一个全局组件</h1>'
        })
        //2.注册
        Vue.component('aaa',Abb);

        // 创建Vue的对象
        let vm = new Vue({
            el:"#app"
        })
    </script>
</body>
</html>